package com.aiyige.base.eventbus;

import com.aiyige.page.interest.model.Interest;

public class EventTapBottomItemRefresh {
    public static final int ITEM_TYPE_HOME = 1;
    public static final int ITEM_TYPE_MESSAGE = 2;
    public static final int ITEM_TYPE_FIND = 3;
    public static final int ITEM_TYPE_MY = 4;
    public static final int ACTION_TYPE_START_REFRESH = 1;
    public static final int ACTION_TYPE_REFRESH_SUCCEED = 2;
    public static final int ACTION_TYPE_REFRESH_FAILED = 3;
    public static final int ACTION_TYPE_PRE_REFRESH = 4;

    private int itemType;
    private int actionType;
    private String message;
    private int pageType;
    private Interest interest;

    public EventTapBottomItemRefresh() {
    }

    private EventTapBottomItemRefresh(Builder builder) {
        setItemType(builder.itemType);
        setActionType(builder.actionType);
        setMessage(builder.message);
        setPageType(builder.pageType);
        setInterest(builder.interest);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public Interest getInterest() {
        return interest;
    }

    public void setInterest(Interest interest) {
        this.interest = interest;
    }

    public int getItemType() {
        return itemType;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public int getActionType() {
        return actionType;
    }

    public void setActionType(int actionType) {
        this.actionType = actionType;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getPageType() {
        return pageType;
    }

    public void setPageType(int pageType) {
        this.pageType = pageType;
    }

    public static final class Builder {
        private int itemType;
        private int actionType;
        private String message;
        private int pageType;
        private Interest interest;

        private Builder() {
            message = "";
        }

        public Builder itemType(int val) {
            itemType = val;
            return this;
        }

        public Builder actionType(int val) {
            actionType = val;
            return this;
        }

        public Builder message(String val) {
            message = val;
            return this;
        }

        public Builder pageType(int val) {
            pageType = val;
            return this;
        }

        public Builder interest(Interest interest) {
            this.interest = interest;
            return this;
        }


        public EventTapBottomItemRefresh build() {
            return new EventTapBottomItemRefresh(this);
        }
    }
}
